package com.briup.demo.dao;

import com.briup.demo.bean.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RoleMapper {
    @Select("select * from role")
    List<Role>selectAll();
    @Insert("insert into role values(null,#{name})")
    void insert(Role role);
    @Update("update role set name=#{name} where id=#{id}")
    void update(Role role);
    @Delete("delete from role where id=#{id}")
    void delete(Long id);
}
